﻿// *----------------------------------------------------------------
// Copyright (C) 2017 通通优品
// 版权所有。
// 
// 类名：OauthModule.cs
// 功能描述：TongTongMall.Oauth2.0
// 
// Create User：jym 2017/02/09
// 
// Edit User：UserName,EditTime
// Describe：Describe
// ----------------------------------------------------------------*/
using Castle.MicroKernel.Registration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using TongTongMall.Modules;
using TongTongMall.Oauth2._0.Client.Attributes;
using TongTongMall.Redis.Cache;

namespace TongTongMall.Oauth2._0
{
    [DependsOn(typeof(KernelModule), typeof(RedisCacheModule))]
    public class OauthModule : BaseModule
    {
        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
        }

        public override void PreInitialize()
        {
            IocManager.IocContainer.Register(Component.For<OAuthAttribute>().LifeStyle.Singleton);
        }
    }
}
